<%@page import="com.jspsmart.upload.SmartUpload"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>


	<%
		SmartUpload sm = new SmartUpload();
		sm.initialize(pageContext); //初始化页面
		sm.setCharset("UTF-8"); //设置字符编码
		sm.upload(); //上传文件
		sm.save("D:\\mysql-5.5.20-win32\\img");
		String picName = sm.getFiles().getFile(0).getFileName(); //获取上传的文件名
		if(picName!=null){
			request.setAttribute("picName", picName);
			request.getRequestDispatcher("register.jsp").forward(request, response);
		}	
		
	%>

</body>
</html>